Introduction

In this project we want to investigate the correlation between the diets and beak measurements of birds. We want to figure out if you can predict a bird diet based on their beak measurements alone.

The Bird Beak

A bird’s beak anatomy can vary greatly in size and shape depending on its habitat and diet. Depending on the function a beak is required to carry out for a certain diet, the beak shape and size can vary greatly (1). e.g.

  • A cone shaped beak is used for picking up and cracking seeds easily.

  • Broader and flatter beaks are needed to create a larger surface area for bug catching in the air.

  • For bug feeding on the groud, beaks are more tweezer-like.

  • For meat eating, very strong beaks are required with the tip pointing downwards in order to hook onto the meat easier.

  • Long thing beaks with a spear-like tip are great for catching fish.

figure 1: Bird Beak Anatomy

figure 1: Bird Beak Anatomy

The bird beak is made up of the cere, nare, culmen, maxilla, mandible and gape fillange (see fig. 1).

The Diets of Birds

The different diet of birds can be sorted into different trophic level. A trophic level defines the hierarchy of an organism in a ecosystem. The main two trophic levels are:

  • Carnivore: A species whose diet consists of >70% of food from consuming live animals.

  • Herbivore: A species whose diet consists >70% of food from consuming plants.

We decided to leave out scavenger birds since they make up <1% of our data and so using them may of led to false predictions.

The main trophic levels can be sub categorised into more niche trophics. Within these categories we found there to be a clearer link between the beak measurements and diets therefore we looked at the most common one, Invertivores to make our model. To be categorised as one the following trophic levels the species must get at least 60% of its diet from the corresponding food resource.

Trophic Niche Diet Description
Frugivore Fruit
Granivore Seeds or Nuts
Nectarivore Nectar
Herbivore Plant Materials in Non-Aquatic Systems; i.e. leaves, buds, whole flowers etc.
Herbivore Aquatic Plant Materials in Aquatic Systems; i.e. algae and aquatic plant leaves
Invertivore Invertebrate Animals in Terrestrial Systems; i.e. insects, worms, arachnids, etc.
Vertivore Vertebrate Animals in Terrestrial Systems; i.e. mammals, birds, reptiles etc.
Aquatic Predator Vertebrate & Invertebrate Animals in Aquatic Systems; i.e. fish, crustacea, molluscs, etc.
Scavenger Carrion (Dead Animal Corpses), Offal or Refuse
Omnivore Species using multiple niches, within or across trophic levels, in relatively equal proportions

Our Data

Our main data set for this project is an AVONET Supplementary Data Set called “birds_data” (2). It contains different bird species measurements and behavior; such as their habitat, diet and migration patterns.

We will be focusing on the following variables of this data set that are useful in our project:

  • Beak Length: The nares length is measured from the front edge of the nostril to the tip of the beak (see fig 2). We’ve chosen to focus on nares length over culmen length (the length from the tip of the beak to the base of the skull) as beak width and depth also refer to the nostril location, whereas the culmen length refers to the skull.

  • Beak Width: Width of the beak at the front edge of the nostrils (see fig 2).

  • Beak Depth: Depth of the beak at the front edge of the nostrils (see fig 2).

  • General Trophic: Main diet level groups (Carnivore, Omnivore, Herbivore, Scavenger)

  • Niche Trophic: Niche diet level, sub categories of Tropic Level groups.

figure 2: Bird Measurements Taken

figure 2: Bird Measurements Taken

Methods

Data Tidying

In order to tidy our original data set we checked for official NAs and located them, selected our required columns to reduce the variable amount, then renamed and reordered the columns to keep them clean and making sense.

Data Science Techniques

During our project we have used a multitude of data science techniques. The main ones we have used are as follows:

  • We have tidied and wrangled the data in order to make it clear and concise when analysing.

  • We have imported the original data set and transcribed into csv format to make it easy for us to read and access.

  • For data visualisation we have created many graphs to demonstrate our findings and data.

  • For our model, we are using logistic regression as we are predicting a discrete value.

Results

The Investigation Process

General Trophic Level

The trophic levels don’t have equal amounts of data, generally the carnavores have many more entries compared to any other column. We don’t believe this is due to sampling bias, just due to the fact there are likely more carnivore species of bird in existence compared to others.

When investigating the beak data, there are three variables to consider; beak length (nares), beak width and beak depth. Summarising the data from these 3 columns we get:

##  Beak_Nares_Length   Beak_Width       Beak_Depth    
##  Min.   :  1.60    Min.   : 0.700   Min.   :  1.00  
##  1st Qu.:  8.50    1st Qu.: 3.600   1st Qu.:  3.80  
##  Median : 11.70    Median : 5.000   Median :  5.80  
##  Mean   : 17.06    Mean   : 6.579   Mean   :  8.06  
##  3rd Qu.: 18.00    3rd Qu.: 7.700   3rd Qu.:  9.40  
##  Max.   :389.80    Max.   :88.900   Max.   :110.90

We can visualise these values in a box plot whilst separating them into their respective General trophic levels:

Discounting the limited data for scavenger birds, these box plots show beak measurements don’t differ greatly between trophic levels on average.

Niche Trophic Level

As from above you can see that there wasn’t a clear distinction of the bird measurements between different General Trophic Levels. So we decided to have a look at the Niche Trophic Levels.

The Trophic with the least varied measurements across the beak are the Nectarivores whereas the trophics with the most variation are the aquatic predators, scavengers, omnivore and herbivore terrestrials. This meakes sence as nectarivores have a very niche diet, only really consiting of nectar compared to the much more varied diet of scavengers and omnivores. This shows that a more varied diet creates higher beak size variation accross the trophic levels.

The following graph summaries these mean beak data sets into values for each niche trophic level:

This further shows how birds with more variation in their diets have a higher variation of beak sizes and shapes.

This pie chart shows the proportion of niche trophics our data includes:

The majority of our Trophic Niche data is the invertivores, so we will be using that data for our model.

Modelling the Data

In order to answer our question of is it possible to predict diet based on beak measurements, we will need to use a logistic regression model since this is a discrete variable case.

Our first model, model-I1, uses only beak depth as a predictor value to predict whether the bird is an Invertivore or not. We then made a second model, model-I for Invertivores that uses all 3 predictor values (beak length, width and depth).

Here is the tidy model of model-I1, using 1 variable:

## # A tibble: 2 × 5
##   term              estimate std.error statistic   p.value
##   <chr>                <dbl>     <dbl>     <dbl>     <dbl>
## 1 (Intercept)         0.809    0.0434       18.7 1.13e- 77
## 2 Beak_Nares_Length  -0.0579   0.00272     -21.3 1.02e-100

birds_fit_I1 model equation:

\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 0.809 - 0.058(Beak Nares Length)\]

Here is the tidy model of model-I, using 3 variables:

## # A tibble: 4 × 5
##   term              estimate std.error statistic   p.value
##   <chr>                <dbl>     <dbl>     <dbl>     <dbl>
## 1 (Intercept)         1.17     0.0490      23.9  2.84e-126
## 2 Beak_Nares_Length  -0.0157   0.00292     -5.37 7.95e-  8
## 3 Beak_Width          0.151    0.0140      10.8  4.08e- 27
## 4 Beak_Depth         -0.271    0.0127     -21.2  3.40e-100

birds_fit_I model equation:

\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 1.171 - 0.016(Beak Nares Length) + 0.151(Beak Width) - 0.271(Beak Depth)\]

The ROC of models I1 and 1 are below:

Discussion

Advantages

In terms of context researches prob have a similar model or method so that they can tell what birds eat without observation. e.g looking at bones. kind of how they do with dinosaurs. The thought behind out model is that birds beaks have evolved and taken on different beak shapes to best eat there chosen food type. Models like this could be used in conjunction with other methods.

Limitations

model is binomial, can only predict success or failure for one food type. Cant predict from a wide variety. Model also isnt very good, would be better if if is within a certain range, or proportion. e.g beak width in proportion to beak length, might get more accurate results. look at cutoff prob table. There is alot of false positives.

see below, using a cutoff percentage of…

Bird is not Invertivore Bird is Invertivore
Bird labelled Invertivore 932 688
Bird labelled not Invertivore 117 463
Bird is not Invertivore Bird is Invertivore
Bird labelled Invertivore 1000 978
Bird labelled not Invertivore 49 173

References

1 (Burleydam garden Centre):

2 (BirdLife 2020):

Figure 1:

Figure 2: